# -*- coding:utf-8 -*-


class StudentItem:
    """ 个人信息 """
    # , name, no, gender, id, nation, hometown, period, department, major, course_list
    def __init__(self):
        self.name = "空"  # 姓名
        self.no = "空"  # 学号
        self.gender = "未设置"  # 性别
        self.id = "空"  # 身份证号
        self.nation = "空"  # 民族
        self.hometown = "空"  # 籍贯
        self.period = "空"  # 入学时期
        self.department = "空"  # 系
        self.major = "空"  # 专业
        self.course_list = []  # 课程列表

    def __str__(self):
        return ("{" + self.name + "," + self.no + "," + self.period + "," +
                self.major + "," + self.id + "," + self.hometown +
                "}").encode("utf8")

    def calculate_point(self):
        all_point = 0
        for course in self.course_list:
            all_point += course.point
        return all_point

    def calculate_gpa(self):
        pass
